SmartReflection: Efficient Introspection in Java
نویسنده
چکیده
In the last few years the interest in reflection has grown and many modern programming languages/environments (e.g., Java and .NET) have provided the programmer with reflective mechanisms, i.e., with the ability of dynamically looking into (introspect) the structure of the code from the code itself. In spite of its evident usefulness, reflection has many detractors, who claim that it is too inefficient to be used with real profit. In this work, we have investigated about the performance issue in the context of the Java reflection library and presented a different approach to the introspection in Java that improves its performances. The basic idea of the proposed approach consists of moving most of the overhead due to the dynamic introspection from run-time to compiletime. The efficiency improvement has been proved by providing a new reflection library compliant – that is, it provides exactly the same services –, with the standard Java reflection library based on the proposed approach. This paper is focused on speeding up the reification and the invocation of methods, i.e., on the class SmartMethod that replaces the class Method of the standard reflection library.
منابع مشابه
Dalang - A Re ective Java Extension
Dalang is a re ective extension for standard Java. It extends the re ective API to include behavioural re ection as well as introspection. It di ers from some other re ective Java implementations in that it requires no change, either to the Java Virtual Machine or the Java system classes. We outline the implementation of Dalang Java, evaluate it, describe our approach to addressing problems wit...
متن کاملSeparating Introspection and Intercession to Support Metamorphic Distributed Systems
Many middleware platforms use computational reflection to support adaptive functionality. Most approaches intertwine the activity of observing behavior (introspection) with the activity of changing behavior (intercession). This paper explores the use of language constructs to separate these parts of reflective functionality. This separation and “packaging” of reflective primitives is intended t...
متن کاملSecurity Risks in Java-based Mobile Code Systems
Java is the predominant language for mobile agent systems, both for implementing mobile agent execution environments and for writing mobile agent applications. This is due to inherent support for code mobility by means of dynamic class loading and separable class name spaces, as well as a number of security properties, such as language safety and access control by means of stack introspection. ...
متن کامل1 Java ’ s Reflection Model and Design Patterns
Dynamic proxies support meta-programming and extend the reflective abilities of Java beyond pure introspection. Proxy objects are interpreted as meta-objects that control the behaviour of application objects at the base level. In this paper, we investigate the implications of applying reflective programming techniques provided by proxies. We address the problem of how such proxies can support o...
متن کاملntrospective-SystemC: Reflection and Introspection in System Level Design
Reflection is an increasingly important feature in software systems as evidenced by introduction of datatype reflection abilities in Java, RTTI runtime type information reflection package for C++, and reflection service in .NET environment. Since systems being designed today are supposed to self-configure, self-heal and make a lot more intelligent decisions about itself, including versioning, f...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Journal of Object Technology
دوره 3 شماره
صفحات -
تاریخ انتشار 2004